Fix documentation about $CFG->hooks_callback_overrides#1466
Merged
andrewnicols merged 2 commits intomoodle:mainfrom Mar 18, 2026
Merged
Fix documentation about $CFG->hooks_callback_overrides#1466andrewnicols merged 2 commits intomoodle:mainfrom
andrewnicols merged 2 commits intomoodle:mainfrom
Conversation
✅ Deploy Preview for moodledevdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
andrewnicols
approved these changes
Mar 18, 2026
The given example for $CFG->hooks_callback_overrides did not work on Moodle 5.1
Backports the fix from PR moodle#1466 to version-4.4, version-4.5, version-5.0, and the main (current) docs.
andrewnicols
approved these changes
Mar 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Hooks API documentation examples to use the correct callback class name for $CFG->hooks_callback_overrides, aligning the override example with the callback naming used in the hooks registration examples and fixing the non-working snippet on Moodle 5.1.
Changes:
- Update the override example callback from
test_otherplugin\\callbacks::...totest_otherplugin\\hook_callbacks::...in the Hooks API docs. - Apply the same correction across the main docs and the versioned docs for 4.4, 4.5, 5.0, and 5.1.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| versioned_docs/version-5.1/apis/core/hooks/index.md | Fix override example callback class name. |
| versioned_docs/version-5.0/apis/core/hooks/index.md | Fix override example callback class name. |
| versioned_docs/version-4.5/apis/core/hooks/index.md | Fix override example callback class name. |
| versioned_docs/version-4.4/apis/core/hooks/index.md | Fix override example callback class name. |
| docs/apis/core/hooks/index.md | Fix override example callback class name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The given example for $CFG->hooks_callback_overrides did not work on Moodle 5.1